/**
 * 
 */
package cyclopean.world.actor;

import cyclopean.world.zone.Position;


// TODO Javadoc
/**
 * 
 *
 * @author Jaco van der Westhuizen
 */
abstract public class Flyer extends Pawn
{
    final float speed;
	/**
     * @param pos
     */
    protected Flyer(Position pos, float mobility, float speed)
    {
	    super(pos, mobility);

	    this.speed = speed;
    }

	/* (non-Javadoc)
	 * @see cyclopean.world.Pawn#lookAt(cyclopean.world.Position)
	 */
	@Override
	public void lookAt(Position pos)
	{
		// TODO Auto-generated method stub
	}

	/* (non-Javadoc)
	 * @see cyclopean.world.Pawn#move(float, float, float)
	 */
	@Override
	public void move(float forward, float right, float up)
	{
	    final float[] vec = new float[3];

		pos.getRelativePos(forward, right, up, null, vec, 0);
		
		applyBodyForce(vec[0] * speed, vec[1] * speed, vec[2] * speed);
	}

	/* (non-Javadoc)
	 * @see cyclopean.world.Pawn#turn(float, float, float)
	 */
	@Override
	public void turn(float right, float up, float spin)
	{
        pos.turn(right, up);
	}
}
